{% load getattr %}

{{model.display_name|default:model.__name__}}

<a href="add/">add</a>

<table>
<thead>
{%for item in model.Metadata.list%}
<td>{{item.1}}</td>
{%endfor%}
<td>{{item.1}}</td>
</thead>
{%for entity in results%}
<tr>
{%for k in model.Metadata.list%}
{%if forloop.first%}
<td><a href="{{entity.key.id}}/">{{entity|getattr:k.0}}</a></td>
{%else%}
<td>{{entity|getattr:k.0}}</td>
{%endif%}
{%endfor%}
<td><a href="{{entity.key.id}}/delete/">delete</a></td>
</tr>
{%endfor%}
</table>

<div>
{%if first_page%}<a href="{{first_page}}">first</a>{%endif%}
{%if pre_page%}<a href="{{pre_page}}">pre</a>{%endif%}
<a href="{{next_page}}">next</a>
</div>